<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Class: RouteMatcher</title>
    
    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">
    
    <h1 class="page-title">Class: RouteMatcher</h1>
    
    



<section>
    
<header>
    <h2>
        <span class="ancestors"><a href="http.html">vertx/http</a>.</span>
    
    RouteMatcher
    </h2>
    
</header>  

<article>
    <div class="container-overview">
    
    
    
        
<dt>
    <h4 class="name" id="RouteMatcher"><span class="type-signature"></span>new RouteMatcher<span class="signature">()</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>
This class allows you to do route requests based on the HTTP verb and the
request URI, in a manner similar to <a * href="http://www.sinatrarb.com/">Sinatra</a> 
or <a * href="http://expressjs.com/">Express</a>.
RouteMatcher also lets you extract paramaters from the request URI either a
simple pattern or using regular expressions for more complex matches. Any
parameters extracted will be added to the requests parameters
which will be available to you in your request handler.
</p>
<p>
It's particularly useful when writing REST-ful web applications.
</p>

<p>
To use a simple pattern to extract parameters simply prefix the parameter
name in the pattern with a ':' (colon).
</p>

<p>
Different handlers can be specified for each of the HTTP verbs, GET, POST, PUT, DELETE etc.
</p>

<p>
For more complex matches regular expressions can be used in the pattern.
When regular expressions are used, the extracted parameters do not have a
name, so they are put into the HTTP request with names of param0, param1,
param2 etc.
</p>

Multiple matches can be specified for each HTTP verb. In the case there are
more than one matching patterns for a particular request, the first matching
one will be used.
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1428">line 1428</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    
    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>var http = require('vertx/http');
var server = http.createHttpServer();

var routeMatcher = new http.RouteMatcher();

routeMatcher.get('/animals/dogs', function(req) {
    req.response.end('You requested dogs');
});

routeMatcher.get('/animals/cats', function(req) {
    req.response.end('You requested cats');    
});

server.requestHandler(routeMatcher).listen(8080, 'localhost');</code></pre>

    
</dd>

    
    </div>
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        <h3 class="subsection-title">Methods</h3>
        
        <dl>
            
<dt>
    <h4 class="name" id="all"><span class="type-signature"></span>all<span class="signature">(pattern, handler)</span><span class="type-signature"> &rarr; {<a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Specify a handler that will be called for a matching HTTP ALL
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>pattern</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">pattern to match</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#RequestHandler">RequestHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">http server request handler</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1551">line 1551</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="allWithRegEx"><span class="type-signature"></span>allWithRegEx<span class="signature">(pattern, handler)</span><span class="type-signature"> &rarr; {<a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Specify a handler that will be called for a matching HTTP request
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>pattern</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">pattern to match</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#RequestHandler">RequestHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">http server request handler</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1672">line 1672</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="connect"><span class="type-signature"></span>connect<span class="signature">(pattern, handler)</span><span class="type-signature"> &rarr; {<a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Specify a handler that will be called for a matching HTTP CONNECT
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>pattern</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">pattern to match</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#RequestHandler">RequestHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">http server request handler</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1527">line 1527</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="connectWithRegEx"><span class="type-signature"></span>connectWithRegEx<span class="signature">(pattern, handler)</span><span class="type-signature"> &rarr; {<a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Specify a handler that will be called for a matching HTTP CONNECT
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>pattern</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">pattern to match</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#RequestHandler">RequestHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">http server request handler</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1648">line 1648</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="delete"><span class="type-signature"></span>delete<span class="signature">(pattern, handler)</span><span class="type-signature"> &rarr; {<a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Specify a handler that will be called for a matching HTTP DELETE
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>pattern</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">pattern to match</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#RequestHandler">RequestHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">http server request handler</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1479">line 1479</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="deleteWithRegEx"><span class="type-signature"></span>deleteWithRegEx<span class="signature">(pattern, handler)</span><span class="type-signature"> &rarr; {<a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Specify a handler that will be called for a matching HTTP DELETE
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>pattern</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">pattern to match</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#RequestHandler">RequestHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">http server request handler</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1600">line 1600</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="get"><span class="type-signature"></span>get<span class="signature">(handler)</span><span class="type-signature"> &rarr; {<a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Specify a handler that will be called for a matching HTTP GET
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#RequestHandler">RequestHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">handler for match</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1443">line 1443</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="getWithRegEx"><span class="type-signature"></span>getWithRegEx<span class="signature">(pattern, handler)</span><span class="type-signature"> &rarr; {<a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Specify a handler that will be called for a matching HTTP GET
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>pattern</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">pattern to match</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#RequestHandler">RequestHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">http server request handler</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1564">line 1564</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="head"><span class="type-signature"></span>head<span class="signature">(pattern, handler)</span><span class="type-signature"> &rarr; {<a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Specify a handler that will be called for a matching HTTP HEAD
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>pattern</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">pattern to match</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#RequestHandler">RequestHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">http server request handler</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1503">line 1503</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="headWithRegEx"><span class="type-signature"></span>headWithRegEx<span class="signature">(pattern, handler)</span><span class="type-signature"> &rarr; {<a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Specify a handler that will be called for a matching HTTP HEAD
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>pattern</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">pattern to match</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#RequestHandler">RequestHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">http server request handler</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1624">line 1624</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="noMatch"><span class="type-signature"></span>noMatch<span class="signature">(handler)</span><span class="type-signature"> &rarr; {<a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Specify a handler that will be called for HTTP request that not match any pattern.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#RequestHandler">RequestHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">http server request handler</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1683">line 1683</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="options"><span class="type-signature"></span>options<span class="signature">(pattern, handler)</span><span class="type-signature"> &rarr; {<a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Specify a handler that will be called for a matching HTTP OPTIONS
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>pattern</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">pattern to match</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#RequestHandler">RequestHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">http server request handler</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1491">line 1491</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="optionsWithRegEx"><span class="type-signature"></span>optionsWithRegEx<span class="signature">(pattern, handler)</span><span class="type-signature"> &rarr; {<a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Specify a handler that will be called for a matching HTTP PUT
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>pattern</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">pattern to match</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#RequestHandler">RequestHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">http server request handler</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1612">line 1612</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="patch"><span class="type-signature"></span>patch<span class="signature">(pattern, handler)</span><span class="type-signature"> &rarr; {<a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Specify a handler that will be called for a matching HTTP PATCH
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>pattern</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">pattern to match</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#RequestHandler">RequestHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">http server request handler</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1539">line 1539</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="patchWithRegEx"><span class="type-signature"></span>patchWithRegEx<span class="signature">(pattern, handler)</span><span class="type-signature"> &rarr; {<a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Specify a handler that will be called for a matching HTTP PATCH
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>pattern</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">pattern to match</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#RequestHandler">RequestHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">http server request handler</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1660">line 1660</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="post"><span class="type-signature"></span>post<span class="signature">(pattern, handler)</span><span class="type-signature"> &rarr; {<a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Specify a handler that will be called for a matching HTTP POST
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>pattern</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">pattern to match</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#RequestHandler">RequestHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">http server request handler</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1467">line 1467</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="postWithRegEx"><span class="type-signature"></span>postWithRegEx<span class="signature">(pattern, handler)</span><span class="type-signature"> &rarr; {<a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Specify a handler that will be called for a matching HTTP POST
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>pattern</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">pattern to match</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#RequestHandler">RequestHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">http server request handler</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1588">line 1588</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="put"><span class="type-signature"></span>put<span class="signature">(pattern, handler)</span><span class="type-signature"> &rarr; {<a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Specify a handler that will be called for a matching HTTP PUT
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>pattern</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">pattern to match</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#RequestHandler">RequestHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">http server request handler</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1455">line 1455</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="putWithRegEx"><span class="type-signature"></span>putWithRegEx<span class="signature">(pattern, handler)</span><span class="type-signature"> &rarr; {<a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Specify a handler that will be called for a matching HTTP PUT
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>pattern</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">pattern to match</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#RequestHandler">RequestHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">http server request handler</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1576">line 1576</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="trace"><span class="type-signature"></span>trace<span class="signature">(pattern, handler)</span><span class="type-signature"> &rarr; {<a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Specify a handler that will be called for a matching HTTP TRACE
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>pattern</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">pattern to match</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#RequestHandler">RequestHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">http server request handler</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1515">line 1515</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a></span>


	</dd>
</dl>

        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="traceWithRegEx"><span class="type-signature"></span>traceWithRegEx<span class="signature">(pattern, handler)</span><span class="type-signature"> &rarr; {<a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a>}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Specify a handler that will be called for a matching HTTP TRACE
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>pattern</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">pattern to match</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>handler</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#RequestHandler">RequestHandler</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">http server request handler</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="http.js.html">vertx/http.js</a>, <a href="http.js.html#line1636">line 1636</a>
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
	<dt>
		Type
	</dt>
	<dd>
		
<span class="param-type"><a href="http.RouteMatcher.html">module:vertx/http.RouteMatcher</a></span>


	</dd>
</dl>

        
    
    
</dd>

        </dl>
    
    
    
    
    
</article>

</section>  




</div>

<nav>
    <h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-vertx.html">vertx</a></li><li><a href="buffer.html">vertx/buffer</a></li><li><a href="console.html">vertx/console</a></li><li><a href="container.html">vertx/container</a></li><li><a href="event_bus.html">vertx/event_bus</a></li><li><a href="file_system.html">vertx/file_system</a></li><li><a href="http.html">vertx/http</a></li><li><a href="multi_map.html">vertx/multi_map</a></li><li><a href="net.html">vertx/net</a></li><li><a href="parse_tools.html">vertx/parse_tools</a></li><li><a href="pump.html">vertx/pump</a></li><li><a href="shared_data.html">vertx/shared_data</a></li><li><a href="sockjs.html">vertx/sockjs</a></li><li><a href="timer.html">vertx/timer</a></li></ul><h3>Externals</h3><ul><li><a href="InetSocketAddress.html">InetSocketAddress</a></li><li><a href="Buffer_.html">Buffer</a></li><li><a href="RecordParser.html">RecordParser</a></li><li><a href="SockJSSocket.html">SockJSSocket</a></li></ul><h3>Classes</h3><ul><li><a href="buffer-Buffer.html">Buffer</a></li><li><a href="file_system.AsyncFile.html">AsyncFile</a></li><li><a href="http.HttpClient.html">HttpClient</a></li><li><a href="http.HttpClientRequest.html">HttpClientRequest</a></li><li><a href="http.HttpClientResponse.html">HttpClientResponse</a></li><li><a href="http.HttpServer.html">HttpServer</a></li><li><a href="http.HttpServerFileUpload.html">HttpServerFileUpload</a></li><li><a href="http.HttpServerRequest.html">HttpServerRequest</a></li><li><a href="http.HttpServerResponse.html">HttpServerResponse</a></li><li><a href="http.RouteMatcher.html">RouteMatcher</a></li><li><a href="http.WebSocket.html">WebSocket</a></li><li><a href="multi_map-MultiMap.html">MultiMap</a></li><li><a href="net.NetClient.html">NetClient</a></li><li><a href="net.NetServer.html">NetServer</a></li><li><a href="net.NetSocket.html">NetSocket</a></li><li><a href="pump-Pump.html">Pump</a></li><li><a href="sockjs.SockJSServer.html">SockJSServer</a></li></ul><h3>Mixins</h3><ul><li><a href="ClientSSLSupport.html">ClientSSLSupport</a></li><li><a href="ReadStream.html">ReadStream</a></li><li><a href="ServerSSLSupport.html">ServerSSLSupport</a></li><li><a href="ServerTCPSupport.html">ServerTCPSupport</a></li><li><a href="SSLSupport.html">SSLSupport</a></li><li><a href="TCPSupport.html">TCPSupport</a></li><li><a href="WriteStream.html">WriteStream</a></li></ul><h3><a href="global.html">Global</a></h3>
</nav>

<br clear="both">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Wed Jul 17 2013 20:27:23 GMT+0100 (BST)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>